@import '../common/style/base.less';

@picker: ~'@{prefix}-picker';
@item: ~'@{picker}-item';
@picker-item-color: var(--td-picker-item-color, @text-color-secondary);
@picker-item-active-color: var(--td-picker-item-active-color, @text-color-primary);
@picker-item-font-size: var(--td-picker-item-font-size, @font-size-m);

:host {
  display: flex;
  // padding: 0 40rpx;
}

.@{item} {
  &__group {
    overflow: hidden;
    flex: 1;
    z-index: 1;
  }

  &__wrapper {
    // 虚拟滚动性能优化：使用 will-change 提示浏览器
    will-change: transform;
  }

  &__item {
    display: flex;
    justify-content: center;
    align-items: center;
    color: @picker-item-color;
    font-size: @picker-item-font-size;
    // 虚拟滚动性能优化：隔离渲染上下文
    contain: layout style paint;

    &-icon {
      font-size: 36rpx;
      margin-right: @spacer;
    }

    &-label {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    &--active {
      color: @picker-item-active-color;
      font-weight: 600;
    }
  }
}
